// Extend.js (http://code.google.com/p/extendjs/)
// Copyright 2010 Shumpei Shiraishi All rights reserved.
// Licensed under the MIT license.

(function(_global) {
    X.extend("RegExp", function(value) {
	return value instanceof RegExp;
    });
    X.RegExp.extend({
	isRegExp: function() {
	    return true;
	},
	source: function() {
	    return this.__val.source;
	},
	global: function() {
	    return this.__val.global;
	},
	ignoreCase: function() {
	    return this.__val.ignoreCase;
	},
	multiline: function() {
	    return this.__val.multiline;
	},
	lastIndex: function() {
	    return this.__val.lastIndex;
	}
    });
    var NATIVE_METHODS_REGEXP = [
	"exec", "test", "toString"
    ];
    X.RegExp.mixin(RegExp.prototype, NATIVE_METHODS_REGEXP);
})(this);
